using System;
using System.Collections.Generic;
using System.Text;

namespace Eve.Data
{
    public class TypeEffect : EveAssociation<Type, Effect>
    {
        private bool isDefault;

        public Type Type
        {
            get { return From; }
        }
        public Effect Effect
        {
            get { return To; }
        }
        public bool IsDefault
        {
            get { return isDefault; }
        }

        internal TypeEffect(DbDataRow dr)
            : base(dr.Database, new Type(dr.Database, dr["typeID"]), new Effect(dr.Database, dr["effectID"]))
        {
            Fill(dr);
        }
        internal TypeEffect(DbDataRow dr, Type type)
            : base(dr.Database, type, new Effect(dr.Database, dr["effectID"]))
        {
            Fill(dr);
        }

        private void Fill(DbDataRow dr)
        {
            isDefault = dr["isDefault"];
        }
    }
}
